//
//  SCMineController.m
//  shangcheng
//
//  Created by 张艳江 on 2019/5/31.
//  Copyright © 2019 张艳江. All rights reserved.
//

#import "SCMineController.h"
#import "SCMyOrderController.h"
#import "SCSetController.h"
#import "SCOrderRefundListController.h"

@interface SCMineController ()

@property (weak, nonatomic) IBOutlet UITableView *tableView;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *top;
@property (weak, nonatomic) IBOutlet UILabel *nickNameLab;
@property (weak, nonatomic) IBOutlet UILabel *collectNumLab;

@end

@implementation SCMineController

- (void)viewWillAppear:(BOOL)animated{
    
    [super viewWillAppear:animated];
    self.navigationController.navigationBar.hidden = YES;
    [UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleLightContent;
    if (@available(iOS 11.0, *)) {
        self.tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
    }else {
        self.automaticallyAdjustsScrollViewInsets = NO;
    }
}
- (void)viewWillDisappear:(BOOL)animated{
    [super viewWillDisappear:animated];
    self.navigationController.navigationBar.hidden = NO;
    [UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleDefault;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.top.constant = 12+kStatusBarHeight;
    self.tableView.backgroundColor = BGColor;
    self.tableView.separatorColor = [UIColor clearColor];
}
- (IBAction)clickOrderBtns:(UIButton *)sender {
    
    if (sender.tag == 5) {
        SCOrderRefundListController *vc = [[SCOrderRefundListController alloc]init];
        [self.navigationController pushViewController:vc animated:YES];
    }else{
        SCMyOrderController *vc = [[SCMyOrderController alloc]init];
        vc.index = sender.tag;
        [self.navigationController pushViewController:vc animated:YES];
    }
}
#pragma mark - 点击设置和信息
- (IBAction)clickTopBtns:(UIButton *)sender {
    if (sender.tag == 0) {//设置
        SCSetController *vc = [[SCSetController alloc]init];
        [self.navigationController pushViewController:vc animated:YES];
    }else{//消息
        
    }
}


@end
